1. Field of the Invention
The present invention relates to a storage unit such as hard disk drives of magnetic disk for example, readable/writable optical disk drives of magneto-optical disk for example etc.
The hard disk drives of computers comprises a segment buffer which temporarily stores write data written from a host computer to the disk medium and read data read from the disk medium to the host computer.
Data stored temporarily are retained, after the operations for the command are completed. When a new command is entered and any free space is not available in the segment buffer, the data are overwritten to be purged. However, if addresses on the disk medium for the new read command are the same as those accessed in the past and relevant data remains in the segment buffer, the remained data in the segment buffer is transferred to the host computer and processing is finished instead of reading the data from the disk medium.
In the case of the full hit above mentioned, the response to the host computer is quick, because there is no seek or rotational latency for disk operations. For such a case it is required to improve the response speed to the host computer by increasing the hit rate of the data in segment buffer.
2. Description of the Related Art
FIG. 7 shows a prior art illustrating a disk read/write method for a conventional storage unit.
As shown in FIG. 7, in the conventional disk soreage unit 1, a management section 11 manages the read data from the disk medium 12 in a segment buffer 2 which is divided into segment units. Addresses of LBAs (Logical Block Addresses) on the disk medium 12, data lengths, storage addresses in the segment buffer 2, command IDs, etc. are stored in the segments together with actual data.
Such a conventional storage unit 1 purges data from the segment buffer 2 based on an LRU (Least Recently Used) rule. According to the LRU rule, when the space is not available enough in the segment buffer 2 to store all the data for a read command at a point, the data stored in the segment buffer 2 according to the oldest command is purged.
The segment containing the data of a full hit time are purged based on the full hit rather than the initial creation time of the segment, because the data which is accessed repeatedly is high potential to be accessed again.
The above described conventional storage unit has the following problem.
According to the LRU rule, a segment which is not accessed from the host computer is purged regularly from an oldest segment buffer 2. On the other hand the disk access from the host computer is triggered by an OS or application on the host computer, and disk access occurs according to access patterns unique to the OS or application. However the conventional storage unit is not considered for the problem.
The hit rate will be increased by purging the inutile data, estimating the access patterns unique to the host to purge unnecessary data immediately and store the data with high probability of future hits from the disk medium 12 to the segment buffer 2 in advance, instead of selecting the segments to be purged based simply on the time factor. This will improve the performance of the storage unit 1. However any disk storing has not been made from the view point.